package org.lld.im.service.utils;

import org.lld.im.common.constant.Constants;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: LunBoWang
 * @description: TODO
 * @date: 2025/4/8 下午7:08
 * @version: 1.0
 */
@Service
public class WriteUserSeq {

    @Resource
    RedisTemplate redisTemplate;

    public void writeUserSeq(Integer appId, String userId, String type, Long seq) {
        String key = appId + ":" + Constants.RedisConstants.SeqPrefix + ":" + userId;
        redisTemplate.opsForHash().put(key, type, seq);
    }
}
